# - try to find PYSIDE
#  PYSIDE_INCLUDE_DIR    - Directories to include to use PYSIDE
#  PYSIDE_LIBRARIES      - Files to link against to use PYSIDE
#  PYSIDE_TYPESYSTEM_DIR - Directories containing typesystem used to extend PYSIDE
#  PYSIDE_FOUND          - PYSIDE was found
#
#  PYSIDE_API_VERSION    - Version of binding api
#  PYSIDE_QT_VERISON     - Version of Wrapped Qt
 
 
FIND_PATH(PYSIDE_INCLUDE_DIR pyside.h /opt/local/include/PySide-2.7)
FIND_LIBRARY(PYSIDE_LIBRARY pyside-python2.7 /opt/local/lib)
FIND_PATH(PYSIDE_TYPESYSTEM_DIR typesystem_core.xml /opt/local/share/PySide-2.7)
 
SET(PYSIDE_FOUND "NO")
IF(PYSIDE_LIBRARY AND PYSIDE_INCLUDE_DIR)
    find_package(Boost 1.38.0 COMPONENTS python REQUIRED)
    find_package(PythonLibs REQUIRED)
    find_package(Qt4 4.5.0 REQUIRED)
 
    #Version
    SET(PYSIDE_API_VERSION @BINDING_API_VERSION@)
    SET(PYSIDE_QT_VERSION @QT_VERSION_MAJOR@.@QT_VERSION_MINOR@)
 
    SET(PYSIDE_FOUND "YES")
    SET(PYSIDE_INCLUDE_DIR 
        ${Boost_INCLUDE_DIR}
        ${PYTHON_INCLUDE_PATH}
        ${QT_INCLUDE_DIR}
        ${QT_QTCORE_INCLUDE_DIR}
        ${PYSIDE_INCLUDE_DIR})
    SET(PYSIDE_LIBRARY
        ${Boost_PYTHON_LIBRARY}
        ${PYTHON_LIBRARIES}
        ${QT_QTCORE_LIBRARY}
        ${PYSIDE_LIBRARY})
ENDIF(PYSIDE_LIBRARY AND PYSIDE_INCLUDE_DIR)
